import { Injectable } from '@angular/core';

Injectable()
class Path {
    url: string;
    path: [{
        name: string;
        route: string;
    }]
}
class SideItem {
    name: string;
    icon: string;
    children: [{
        name: string;
        route: string;
    }]
}

//页面路径条对比数组
export const pathsItems: Path[] = [
    {
        url: "/work/running/status",
        path: [
            { name: "设备运行", route: 'running/status' },
            { name: "整机信息", route: 'running/status' }
        ]
    },
    {
        url: "/work/running/counts",
        path: [
            { name: "设备运行", route: 'running/status' },
            { name: "运行统计", route: 'running/counts' }
        ]
    },
    {
        url: "/work/sell/customer",
        path: [
            { name: "相关方管理", route: 'sell/customer' },
            { name: "客户列表", route: 'sell/customer' }
        ]
    },
    {
        url: "/work/sell/dealer",
        path: [
            { name: "相关方管理", route: 'sell/dealer' },
            { name: "经销商列表", route: 'sell/dealer' }
        ]
    },
    {
        url: "/work/equipment/product",
        path: [
            { name: "设备管理", route: 'equipment/product' },
            { name: "产品设置", route: 'equipment/product' },
        ]
    },
    {
        url: "/work/equipment/warning",
        path: [
            { name: "设备管理", route: 'equipment/product' },
            { name: "预警设置", route: 'equipment/warning' },
        ]
    },
    {
        url: "/work/equipment/list",
        path: [
            { name: "设备管理", route: 'equipment/product' },
            { name: "设备列表", route: 'equipment/list' },
        ]
    },
    {
        url: "/work/equipment/bind",
        path: [
            { name: "设备管理", route: 'equipment/product' },
            { name: "设备列表", route: 'equipment/list' },
            { name: "绑定设备", route: 'equipment/bind' },
        ]
    },
    {
        url: "/work/enterprise/list",
        path: [
            { name: "我的企业", route: 'enterprise/list' },
            { name: "账户列表", route: 'enterprise/list' },
        ]
    },
    {
        url: "/work/enterprise/authority",
        path: [
            { name: "我的企业", route: 'enterprise/list' },
            { name: "权限设置", route: 'enterprise/authority' },
        ]
    }
]

//sideBar items
export const sideItems: SideItem[] = [
    {
        name: "设备运行",
        icon: 'anticon-pie-chart',
        children: [
            { name: "整机信息", route: 'running/status' },
            { name: "运行统计", route: 'running/counts' },
        ]
    },
    {
        name: "相关方管理",
        icon: 'anticon-team',
        children: [
            { name: "经销商列表", route: 'sell/dealer' },
            { name: "客户列表", route: 'sell/customer' }
        ]
    },
    {
        name: "设备管理",
        icon: 'anticon-setting',
        children: [
            { name: "产品设置", route: 'equipment/product' },
            { name: "预警设置", route: 'equipment/warning' },
            { name: "设备列表", route: 'equipment/list' },
        ]
    },
    {
        name: "我的企业",
        icon: 'anticon-home',
        children: [
            { name: "账户列表", route: 'enterprise/list' },
            { name: "权限设置", route: 'enterprise/authority' },
        ]
    }
]

export class Globals {
    //当前页面路径条
    paths: Path = pathsItems[0]
}
